package com.bos.data.model;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "sales", schema = "dbo", catalog = "")
public class SalesModel {
    private Integer id;
    private String status;//业务状态
    private String sname;//客户名称
    private String stype;//业务类别
    private BigDecimal money;
    private String sleader;//销售负责人
    private String content;//简要说明
    private String point;//工作目标要点
    private String target;//工作绩效目标
    private Timestamp update_time;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "sname")
    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    @Basic
    @Column(name = "stype")
    public String getStype() {
        return stype;
    }

    public void setStype(String stype) {
        this.stype = stype;
    }

    @Basic
    @Column(name = "money")
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    @Basic
    @Column(name = "sleader")
    public String getSleader() {
        return sleader;
    }

    public void setSleader(String sleader) {
        this.sleader = sleader;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "point")
    public String getPoint() {
        return point;
    }

    public void setPoint(String point) {
        this.point = point;
    }

    @Basic
    @Column(name = "target")
    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    @Basic
    @Column(name = "update_time")


    public Timestamp getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Timestamp update_time) {
        this.update_time = update_time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SalesModel that = (SalesModel) o;
        return id == that.id &&
                Objects.equals(status, that.status) &&
                Objects.equals(sname, that.sname) &&
                Objects.equals(stype, that.stype) &&
                Objects.equals(money, that.money) &&
                Objects.equals(sleader, that.sleader) &&
                Objects.equals(content, that.content) &&
                Objects.equals(point, that.point) &&
                Objects.equals(target, that.target);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, status, sname, stype, money, sleader, content, point, target);
    }
    public SalesModel() {
        super();
        // TODO Auto-generated constructor stub
    }
    public SalesModel(int sid, String status, String sname, String stype,
                 BigDecimal money, String sleader, String content, String point,
                 String  target) {
        super();
        this.id = sid;
        this.status = status;
        this.sname = sname;
        this.stype = stype;
        this.money = money;
        this.sleader = sleader;
        this.content = content;
        this.point = point;
        this.target = target;
    }



    public SalesModel(String status, String sname, String stype, BigDecimal money,
                 String sleader, String content, String point, String target) {
        super();
        this.status = status;
        this.sname = sname;
        this.stype = stype;
        this.money = money;
        this.sleader = sleader;
        this.content = content;
        this.point = point;
        this.target = target;
    }
    
}
